how to create a chart in javascript